From 6784414bbd3733814c8891303695f7d48dde1a1c Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 16 Apr 2008 16:17:44 +0000 Subject: [PATCH] Allow $wgArticle to be null on special pages --- includes/Exception.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Exception.php b/includes/Exception.php index 7b7254ffd0..8a76b5f52e 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -12,7 +12,8 @@ class MWException extends Exception { */ function useOutputPage() { return !empty( $GLOBALS['wgFullyInitialised'] ) && - !empty( $GLOBALS['wgArticle'] ) && !empty( $GLOBALS['wgTitle'] ); + ( !empty( $GLOBALS['wgArticle'] ) || ( !empty( $GLOBALS['wgOut'] ) && !$GLOBALS['wgOut']->isArticle() ) ) && + !empty( $GLOBALS['wgTitle'] ); } /** -- 2.20.1